<!--#include virtual="/common/Config.asp" -->
<!--#include virtual="/common/conn.asp" -->
<!--#include virtual="/common/function.asp" -->
<%
Dim FM_ID	
Dim Rent_Title
Dim City_Area
Dim Price_Type
Dim Rent_Type
Dim Room_Area	
Dim Room_ZX
Dim Room_Floor
Dim Room_Pic		
Dim Room_Address
Dim Room_Address_S
Dim Room_Link		
Dim Room_Tel	
Dim Rent_Price
Dim Room_Pay		
Dim Room_Rent_Date	
Dim Room_Rent_YJ	
Dim Room_Build_Year
Dim View_Count
Sub Get_Rent_Info()

	fm_id = Requery("ID")

	Call Check_IsNumeric(fm_id)

	Sql = "SELECT * FROM Rent_Info WHERE ID="&fm_id


	Set rs = conn.execute(sql)
	
	If Not rs.eof Then
		Rent_Title   	= rs("Rent_Title") 
		City_Area       = rs("City_Area")
		Price_Type		= rs("Price_Type")
		Room_Type		= rs("Room_Type")
		Rent_Type		= rs("Rent_Type")
		Room_Area		= rs("Room_Area")
		Room_ZX			= rs("Room_ZX")
		Room_Floor		= rs("Room_Floor")
		Rent_Price		= rs("Rent_Price")
		Room_Pic		= rs("Room_Pic")
		Room_Address	= rs("Room_AddrSss")
		Room_Address_S	= rs("Room_AddrSss_S")
		Room_Link		= rs("Room_Link")
		Room_Tel		= rs("Room_Tel")

		Room_Pay		= rs("Room_Pay")	
		Room_Rent_Date	= rs("Room_Rent_Date")	
		Room_Rent_YJ	= rs("Room_Rent_YJ")		
		Room_Build_Year = rs("Room_Build_Year")	
				   
		Update_Name    = rs("Update_Name")
		Update_Date    = rs("Update_Date")

		View_Count	   = rs("View_Count")

	End If
	rs.close
	conn.execute("UPDATE Rent_Info SET View_Count=View_Count+1 WHERE ID="&fm_id)

End Sub 
Sub News_Realestate_List(Realestate_Type)
	Sql = "SELECT  TOP 6 b.RI_ID,b.RI_Name,b.RI_JZMZ,b.RI_Pic,b.RI_Avg_Price FROM uvw_Sort_Info a INNER JOIN Realestate_Info b ON a.Info_ID = b.RI_ID  WHERE  a.Sort_Sub_Name='"&Realestate_Type&"' ORDER  BY a.Sort_Order ASC"
	Info_List = GetRsRows(Sql)
	If IsArray(Info_List) Then 
		For i=0 To UBound(Info_List,2)
			RI_ID		= Info_List(0,i)
			RI_Name		= Info_List(1,i)
			RI_JZMZ		= Info_List(2,i)
			RI_Pic		= Info_List(3,i)
			RI_Avg_Price= Info_List(4,i)
			detail_url = "Realestate_Show.asp?ID="&RI_ID

			Response.Write "<li><a href="""&detail_url&"""><img src="""&RI_Pic&""" align=""left"" width=116 height=64/></a>"
			Response.Write "	<h4><a href="""&detail_url&""">"&RI_Name&"</a></h4>"
			Response.Write "	<p>建筑面积："&RI_JZMZ&"㎡</p>"
			Response.Write "	<p>参考均价：<i>¥"&RI_Avg_Price&"/㎡</i></p>"
			Response.Write "</li>"


		Next 
	
	End If 

End Sub 
Sub Hot_Realestate_List(Realestate_Type)
	Sql = "SELECT  TOP 6 b.RI_ID,b.RI_Name,b.RI_Open_Date,b.RI_Pic,b.RI_Avg_Price FROM uvw_Sort_Info a INNER JOIN Realestate_Info b ON a.Info_ID = b.RI_ID  WHERE  a.Sort_Sub_Name='"&Realestate_Type&"' ORDER  BY a.Sort_Order ASC"
	Info_List = GetRsRows(Sql)
	If IsArray(Info_List) Then 
		For i=0 To UBound(Info_List,2)
			RI_ID		= Info_List(0,i)
			RI_Name		= Info_List(1,i)
			RI_Open_Date= Info_List(2,i)
			RI_Pic		= Info_List(3,i)
			RI_Avg_Price= Info_List(4,i)
			detail_url = "Realestate_Show.asp?ID="&RI_ID

			Response.Write "<div class=""house_hot_frist"">"
			Response.Write "	<a href="""&detail_url&"""><img src="""&RI_Pic&""" align=""left"" width=109 height=60 /></a>"
			Response.Write "	<h4><a href="""&detail_url&""">"&RI_Name&"</a></h4>"
			Response.Write "	<p>开盘时间："&RI_Open_Date&"</p>"
			Response.Write "	<p>参考均价：<i>¥"&RI_Avg_Price&"/㎡</i></p>"
			Response.Write "</div>"
			Response.Write "<p class=""mar_c_line v4_line""></p>"


		Next 
	
	End If 

End Sub 
Sub Good_Realestate_List(Realestate_Type)
	Sql = "SELECT  TOP 8 b.RI_ID,b.RI_Name,b.RI_Open_Date,b.RI_Pic,b.RI_Avg_Price FROM uvw_Sort_Info a INNER JOIN Realestate_Info b ON a.Info_ID = b.RI_ID  WHERE  a.Sort_Sub_Name='"&Realestate_Type&"' ORDER  BY a.Sort_Order ASC"
	Info_List = GetRsRows(Sql)
	If IsArray(Info_List) Then 
		For i=0 To UBound(Info_List,2)
			RI_ID		= Info_List(0,i)
			RI_Name		= Info_List(1,i)
			RI_Open_Date= Info_List(2,i)
			RI_Pic		= Info_List(3,i)
			RI_Avg_Price= Info_List(4,i)
			detail_url = "Realestate_Show.asp?ID="&RI_ID

			Response.Write "<li><p><a href="""&detail_url&"""><img src="""&RI_Pic&"""  width=116 height=64/></a></p><p><a href="""&detail_url&""">"&RI_Name&"</a></p></li>"


		Next 
	
	End If 

End Sub 

Sub Example_Realestate_List(Realestate_Type)
	Sql = "SELECT  TOP 7 b.RI_ID,b.RI_Name,b.RI_Open_Date,b.RI_Pic,b.RI_Avg_Price FROM uvw_Sort_Info a INNER JOIN Realestate_Info b ON a.Info_ID = b.RI_ID  WHERE  a.Sort_Sub_Name='"&Realestate_Type&"' ORDER  BY a.Sort_Order ASC"
	Info_List = GetRsRows(Sql)
	If IsArray(Info_List) Then 
		For i=0 To UBound(Info_List,2)
			RI_ID		= Info_List(0,i)
			RI_Name		= Info_List(1,i)
			RI_Open_Date= Info_List(2,i)
			RI_Pic		= Info_List(3,i)
			RI_Avg_Price= Info_List(4,i)
			detail_url = "Realestate_Show.asp?ID="&RI_ID

			Response.Write "<li><p><a href="""&detail_url&"""><img src="""&RI_Pic&"""  width=124 height=90/></a></p><p><a href="""&detail_url&""">"&RI_Name&"</a></p></li>"

		Next 
	
	End If 

End Sub
Sub Get_News_List(Info_Type_Name,Info_Count)
	Sql = "SELECT  TOP "&Info_Count&" b.Info_ID,b.Info_Title,b.Info_Pic,b.Update_Date FROM uvw_Sort_Info a INNER JOIN uvw_News b ON a.Info_ID = b.Info_ID  WHERE  a.Sort_Sub_Name='"&Info_Type_Name&"' ORDER  BY a.Sort_Order ASC"

	Info_List = GetRsRows(Sql)
	If IsArray(Info_List) Then 
		Response.Write "<ul class=""ind_m_move"">"
		For i=0 To UBound(Info_List,2)
			news_id		= Info_List(0,i)
			news_title  = Info_List(1,i)
			news_Pic	= Info_List(2,i)
			news_detail_url = "Realestate_News_Detail.asp?Info_ID="&news_id

			Response.Write "<li><a href="""&news_detail_url&""">"&news_title&"</a></li>"
		Next 

	
	End If 
End Sub 
Sub Get_News_List2(Info_Type_Name,Info_Count)
	Sql = "SELECT  TOP "&Info_Count&" b.Info_ID,b.Info_Title,b.Info_Pic,b.Update_Date FROM uvw_Sort_Info a INNER JOIN uvw_News b ON a.Info_ID = b.Info_ID  WHERE  a.Sort_Sub_Name='"&Info_Type_Name&"' ORDER  BY a.Sort_Order ASC"

	Info_List = GetRsRows(Sql)
	If IsArray(Info_List) Then 
		Response.Write "<div>"
		Response.Write "<ul class=""rent_guide_txt"">"
		For i=0 To UBound(Info_List,2)
			news_id		= Info_List(0,i)
			news_title  = Info_List(1,i)
			news_Pic	= Info_List(2,i)
			news_detail_url = "Realestate_News_Detail.asp?Info_ID="&news_id

			Response.Write "<li><a href="""&news_detail_url&""">"&news_title&"</a></li>"
			If i=5 Then Exit For 
		Next 
		Response.Write "</ul>"
		Response.Write "</div>"
		Response.Write "<p class=""mar_c_line v4_line""></p>"
		Response.Write "<div>"
		Response.Write "<ul class=""rent_guide_doc"">"
		For i=6 To UBound(Info_List,2)
			news_id		= Info_List(0,i)
			news_title  = Info_List(1,i)
			news_Pic	= Info_List(2,i)
			news_detail_url = "Realestate_News_Detail.asp?Info_ID="&news_id

			Response.Write "<li><a href="""&news_detail_url&""">"&news_title&"</a></li>"
		Next 
		Response.Write "</ul>"
		Response.Write "</div>"

	
	End If 
End Sub 
Dim RI_Pic			
Dim RI_Pic_B		

Dim RI_Name			
Dim RI_Address		
Dim RI_City			
Dim RI_Developer	
Dim RI_Sell_No		
Dim RI_Start_Price	
Dim RI_Avg_Price	
Dim RI_Open_Date	
Dim RI_Start_Date	
Dim RI_Sell_Phone	
Dim RI_Detail		

Dim RI_WY			
Dim RI_CX			
Dim RI_ZDMZ			
Dim RI_JZXS			
Dim RI_ZXZK			
Dim RI_JZMZ			
Dim RI_CW			
Dim RI_HX			
Dim RI_JGSJ			
Dim RI_JDZJ			
Dim RI_JXZJ			
Dim RI_GHSJ			
Dim RI_LSJK			


Dim RI_JTZK			
Dim RI_ZBPT			
Dim RI_SXFW	
Sub Get_Realestate_Info()

	ID = Requery("ID")

	Call Check_IsNumeric(ID)

	Sql = "SELECT * FROM Realestate_Info WHERE RI_ID="&ID

	Set rs = conn.execute(sql)
	
	If Not rs.eof Then
		RI_Pic = rs("RI_Pic")			
		RI_Pic_B = rs("RI_Pic_B")		

		RI_Name = rs("RI_Name")			
		RI_Address = rs("RI_Address")		
		RI_City = rs("RI_City")			
		RI_Developer = rs("RI_Developer")	
		RI_Sell_No = rs("RI_Sell_No")		
		RI_Start_Price = rs("RI_Start_Price")	
		RI_Avg_Price = rs("RI_Avg_Price")	
		RI_Open_Date = rs("RI_Open_Date")	
		RI_Start_Date = rs("RI_Start_Date")	
		RI_Sell_Phone = rs("RI_Sell_Phone")	
		RI_Detail = rs("RI_Detail")		

		RI_WY = rs("RI_WY")			
		RI_CX = rs("RI_CX")			
		RI_ZDMZ = rs("RI_ZDMZ")			
		RI_JZXS = rs("RI_JZXS")			
		RI_ZXZK = rs("RI_ZXZK")			
		RI_JZMZ = rs("RI_JZMZ")			
		RI_CW = rs("RI_CW")			
		RI_HX = rs("RI_HX")			
		RI_JGSJ = rs("RI_JGSJ")			
		RI_JDZJ = rs("RI_JDZJ")			
		RI_JXZJ = rs("RI_JXZJ")			
		RI_GHSJ = rs("RI_GHSJ")			
		RI_LSJK = rs("RI_LSJK")			


		RI_JTZK = rs("RI_JTZK")			
		RI_ZBPT = rs("RI_ZBPT")			
		RI_SXFW = rs("RI_SXFW")							   

	End If

End Sub 
'出租信息列表
Sub Rent_Info_List(Info_Type_Name,Info_Count)
	Sql = "SELECT  TOP "&Info_Count&" b.ID,b.City_Area,b.Room_Type2,b.Rent_Price,b.Update_Date,b.Rent_Title FROM uvw_Sort_Info a INNER JOIN Rent_Info b ON a.Info_ID = b.ID  WHERE  a.Sort_Sub_Name='"&Info_Type_Name&"' ORDER  BY a.Sort_Order ASC"
	Info_List = GetRsRows(Sql)
	If IsArray(Info_List) Then 
		For i=0 To UBound(Info_List,2)
			ID			= Info_List(0,i)
			City_Area   = Info_List(1,i)
			Room_Type2	= Info_List(2,i)
			Rent_Price	= Info_List(3,i)
			Update_Date	= Info_List(4,i)
			Rent_Title	= Info_List(5,i)
			City_Name = Get_FirstValue("SELECT Ca_Name FROM City_Area WHERE ID IN (SELECT Parent_ID FROM City_Area WHERE ID="&City_Area&")")

			detail_url = "rent_detail.asp?ID="&ID
			Response.Write "<li>"
			Response.Write "<span class=""rent_name""><a href="""&detail_url&""">"&City_Name&"</a> <em>/</em> <a href="""&detail_url&""">"&Rent_Title&"</a></span>"
			Response.Write "<span class=""rent_type tc"">"&Room_Type2&"</span><span class=""rent_price tc""><i>"&Rent_Price&"</i></span>"
			Response.Write "<span class=""rent_view tc"">14</span><span class=""rent_date tr"">"&Update_Date&"</span>"
			Response.Write "</li>"

		Next 
	
	End If 
End Sub 
Sub Room_Sell_Info_List(Info_Type_Name,Info_Count)
	Sql = "SELECT  TOP "&Info_Count&" b.ID,b.City_Area,b.Room_Type2,b.Rent_Price,b.Update_Date,b.Rent_Title FROM uvw_Sort_Info a INNER JOIN Rent_Info b ON a.Info_ID = b.ID  WHERE  a.Sort_Sub_Name='"&Info_Type_Name&"' ORDER  BY a.Sort_Order ASC"
	Info_List = GetRsRows(Sql)
	If IsArray(Info_List) Then 
		For i=0 To UBound(Info_List,2)
			ID			= Info_List(0,i)
			City_Area   = Info_List(1,i)
			Room_Type2	= Info_List(2,i)
			Rent_Price	= Info_List(3,i)
			Update_Date	= Info_List(4,i)
			Rent_Title	= Info_List(5,i)
			City_Name = Get_FirstValue("SELECT Ca_Name FROM City_Area WHERE ID IN (SELECT Parent_ID FROM City_Area WHERE ID="&City_Area&")")
			detail_url = "sell_detail.asp?ID="&ID
			Response.Write "<li>"
			Response.Write "<span class=""rent_name""><a href="""&detail_url&""">"&City_Name&"</a> <em>/</em> <a href="""&detail_url&""">"&Rent_Title&"</a></span>"
			Response.Write "<span class=""rent_type tc"">"&Room_Type2&"</span><span class=""rent_price tc""><i>"&Rent_Price&"</i></span>"
			Response.Write "<span class=""rent_view tc"">14</span><span class=""rent_date tr"">"&Update_Date&"</span>"
			Response.Write "</li>"

		Next 
	
	End If 
End Sub 
Dim News_ID			
Dim Info_Type_ID		
Dim Info_Title		
Dim Info_URL		
Dim Info_ZY			
Dim Info_Content
Dim Info_Type
Dim Info_Type2
Dim Info_From
Dim Info_PicPath
Dim Update_Date
Dim Update_Name

Sub  Get_News_Detail()
	News_ID = Requery("Info_ID")

	Call Check_IsNumeric(News_ID)

	Sql = "SELECT Info_Type_ID,Info_Title,Info_URL,Info_ZY,Info_Content,Update_Date,BT_Name,IT_Name,Update_Name,Info_From FROM uvw_News WHERE Info_ID="&News_ID
	Array_List = GetRsRows(Sql)
	If IsArray(Array_List) Then 
		Info_Type_ID= Array_List(0,0)
		Info_Title	= Array_List(1,0)
		Info_URL	= Array_List(2,0)
		Info_ZY		= Array_List(3,0)
		Info_Content= Array_List(4,0)
		Update_Date = Array_List(5,0)
		Info_Type	= Array_List(6,0)
		Info_Type2  = Array_List(7,0)
		Update_Name = Array_List(8,0)
		Info_From	= Array_List(9,0)
	Else
		AlertBox "记录不存在!","javascript:history.go(-1)"
	End If 
	
End Sub
Sub News_Related_List()
	Sql = "SELECT  TOP 5 b.Info_ID,b.Info_Title,b.Info_Pic,b.Info_URL,b.Update_Date FROM  uvw_News B WHERE  b.IT_Name='"&Info_Type2&"' ORDER  BY b.Info_ID DESC"
	Array_List = GetRsRows(Sql)
	If IsArray(Array_List) Then 

		For i=0 To UBound(Array_List,2)
			news_id		= Array_List(0,i)
			news_title	= cutstr(Array_List(1,i),20)
			news_pic	= Array_List(2,i)

			Info_URL	= Array_List(3,i)
			Update_Date	= Array_List(4,i)
			If Info_URL<>"" Then 
				news_detail_url = Info_URL

			Else			
				news_detail_url = "Realestate_News_Detail.asp?Info_ID="&news_id
			End If 

			echo "<li><a href="""&news_detail_url&""">·"&news_title&"</a></li>"

		Next 
	End If 


End Sub 
Sub Get_Pic_News_List(News_Sub_Type,number)
	Sql = "SELECT  TOP "&number&" b.Info_ID,b.Info_Title,b.Info_Pic,b.Info_URL,b.Update_Date FROM uvw_Sort_Info a INNER JOIN uvw_News b ON a.Info_ID = b.Info_ID  WHERE  a.Sort_Sub_Name='"&News_Sub_Type&"' ORDER  BY a.Sort_Order ASC"
	Array_List = GetRsRows(Sql)
	If IsArray(Array_List) Then 

		For i=0 To UBound(Array_List,2)
			news_id		= Array_List(0,i)
			news_title	= cutstr(Array_List(1,i),20)
			news_pic	= Array_List(2,i)

			Info_URL	= Array_List(3,i)
			If Info_URL<>"" Then 
				news_detail_url = Info_URL

			Else			
				news_detail_url = "Realestate_News_Detail.asp?Info_ID="&news_id
			End If 

			echo "<li><a href="""&news_detail_url&""" target=""_blank""><img src="""&news_pic&""" width=130 height=88/></a><p class=""n""><a href="""&news_detail_url&""" target=""_blank"">"&news_title&"</a></p></li>"
		Next 
	End If 

End Sub 
Sub Get_News_List6(News_Sub_Type,number)
	Sql = "SELECT  TOP "&number&" b.Info_ID,b.Info_Title,b.Info_Pic,b.Info_URL,b.Update_Date FROM uvw_Sort_Info a INNER JOIN uvw_News b ON a.Info_ID = b.Info_ID  WHERE  a.Sort_Sub_Name='"&News_Sub_Type&"' ORDER  BY a.Sort_Order ASC"
	Array_List = GetRsRows(Sql)
	If IsArray(Array_List) Then 

		For i=0 To UBound(Array_List,2)
			news_id		= Array_List(0,i)
			news_title	= cutstr(Array_List(1,i),25)
			news_pic	= Array_List(2,i)

			Info_URL	= Array_List(3,i)
			Update_Date	= Array_List(4,i)
			If Info_URL<>"" Then 
				news_detail_url = Info_URL

			Else			
				news_detail_url = "Realestate_News_Detail.asp?Info_ID="&news_id
			End If 

			echo "<li><a href="""&news_detail_url&""">·"&news_title&"</a></li>"

		Next 
	End If 

End Sub 
Sub Get_V_News_List(News_Sub_Type,number)
	Sql = "SELECT  TOP "&number&" b.Info_ID,b.Info_Title,b.Info_Pic,b.Info_URL,b.Update_Date FROM uvw_Sort_Info a INNER JOIN uvw_News b ON a.Info_ID = b.Info_ID  WHERE  a.Sort_Sub_Name='"&News_Sub_Type&"' ORDER  BY a.Sort_Order ASC"
	Array_List = GetRsRows(Sql)
	If IsArray(Array_List) Then 

		For i=0 To UBound(Array_List,2)
			news_id		= Array_List(0,i)
			news_title	= cutstr(Array_List(1,i),20)
			news_pic	= Array_List(2,i)

			Info_URL	= Array_List(3,i)
			If Info_URL<>"" Then 
				news_detail_url = Info_URL

			Else			
				news_detail_url = "Realestate_News_Detail.asp?Info_ID="&news_id
			End If 

			echo "<li><a href="""&news_detail_url&""" target=""_blank""><img src="""&news_pic&""" width=130 height=88/></a><p class=""n""><a href="""&news_detail_url&""" target=""_blank"">"&news_title&"</a></p></li>"
		Next 
	End If 

End Sub 
Sub sub_menu(xxx)

	Script_Path = Request.ServerVariables("SCRIPT_NAME")
	Catalog_Name =  LCase(Split(Script_Path,"/")(2))
	If InStr(Catalog_Name,"index")>0 Then 
		home_act=" class=""selected"""
	End If 
	If InStr(Catalog_Name,"realestate_news")>0 Then 
		news_act=" class=""selected"""
	End If 
	If InStr(Catalog_Name,"realestate_list")>0 Or InStr(Catalog_Name,"Realestate_Show")>0  Then 
		real_act=" class=""selected"""
	End If 
	If InStr(Catalog_Name,"rent")>0 Then 
		rent_act=" class=""selected"""
	End If 
	If InStr(Catalog_Name,"sell")>0 Then 
		sell_act=" class=""selected"""
	End If 



	Response.Write "<li"&home_act&"><a href=""/Rent/""><span>房产首页</span></a></li>"
	Response.Write "<li"&news_act&"><a href=""/Rent/Realestate_News_List.asp""><span>房产资讯</span></a></li>"
	Response.Write "<li"&real_act&"><a href=""/Rent/Realestate_List.asp""><span>楼盘在线</span></a></li>"
	Response.Write "<li"&rent_act&"><a href=""/Rent/rent.asp""><span>出 租 房</span></a></li>"
	Response.Write "<li"&sell_act&"><a href=""/Rent/sell.asp""><span>房屋买卖</span></a></li>"
End Sub 
%>
